import { CardEditableParamsDefault, CardDataEditableParamsCommonDefault } from "@/views/card/js/data/cardDatas/card-datas-default.js";
import TooltipsData from "@/views/card/js/data/tooltipsData/tooltips-data.js";
const CARD_177 =  {
  data_from_type: {
    // ...CardEditableParamsDefault.InputNormal,
    // label: '数据来源类型',
    // placeholder: '请填入数据来源类型',
    // disabled: true,

    ...CardEditableParamsDefault.DropdownNormal,
    label: '数据来源类型',
    placeholder: '请填入数据来源类型',
    valLists: [
      {
        name: '无',
        value: 'null',
      },
      {
        name: '来测',
        value: 'laice',
      },
    ],
  },
  data_from_site_id: {
    ...CardEditableParamsDefault.InputNormal,
    label: '数据来源站点ID',
    placeholder: '请填入数据来源站点ID',

    param_effect_parent: {
      effect_parent_keys: ['data_from_type'],
      effect_type: ['SHOW_HIDE'],
      effect_parent_val: 'laice',
      effect_clear: {
        effect_clear_default_val: '',
      },
    },
  },

  cur_score: {
    ...CardEditableParamsDefault.SliderNormal,
    label: '当前分数',
    step: 1,
    max: 1000000,
    min: 0,

    param_effect_parent: {
      effect_parent_keys: ['data_from_type'],
      effect_type: ['SHOW_HIDE'],
      effect_parent_val: 'null',
      effect_clear: {
        effect_clear_default_val: 0,
      },
    },
  },
  cur_score_txt: {
    ...CardEditableParamsDefault.InputNormal,
    label: '当前分数描述',
    placeholder: '请填入当前分数描述，10个汉字',
  },

  my_score: {
    ...CardEditableParamsDefault.SliderNormal,
    label: '我的分数',
    step: 1,
    max: 1000000,
    min: 0,

    param_effect_parent: {
      effect_parent_keys: ['data_from_type'],
      effect_type: ['SHOW_HIDE'],
      effect_parent_val: 'null',
      effect_clear: {
        effect_clear_default_val: 0,
      },
    },
  },
  my_score_txt: {
    ...CardEditableParamsDefault.InputNormal,
    label: '我的分数描述',
    placeholder: '请填入我的分数描述，12个汉字',
  },
  pop: {
    ...CardEditableParamsDefault.Obj,
    label: '气泡',
    param_params: {
      txt: {
        ...CardEditableParamsDefault.InputNormal,
        label: '气泡文字',
        placeholder: '请填入气泡文字，15个汉字',
      }
    }
  },
  activities: {
    ...CardEditableParamsDefault.Lists,
    label: '节点',
    param_params: {
      image: {
        ...CardEditableParamsDefault.ImageNormal,
        label: '节点图片',
        res_type: 'String',  // Array : fileList, String : value
        placeholder: '请选择活动图片，100*100，500k以内，jpg/jpeg/png格式',
        limit: 1,
        size: 500,
        accept: '.jpg, .jpeg, .png',
        tooltips: `请选择活动图片，100*100，500k以内，jpg/jpeg/png格式`,
      },
      title: {
        ...CardEditableParamsDefault.InputNormal,
        label: '节点名称',
        placeholder: '请填入活动名称，10个汉字',
      },
      score: {
        ...CardEditableParamsDefault.SliderNormal,
        label: '节点达标分值',
        step: 1,
        max: 1000000,
        min: 0,
      },
      button: {
        ...CardEditableParamsDefault.Obj,
        label: '未达标按钮配置',
        param_params: {
          sub_type: {
            ...CardEditableParamsDefault.DropdownNormal,
            label: '按钮类型',
            placeholder: '请选择按钮类型',
            valLists: [
              {
                name: '待解锁',  // 默认类型
                value: 0,
              },
              {
                name: '已达标',
                value: 1,
              },
              {
                name: '未达标',
                value: 2,
              },
            ],
          },
          name: {
            ...CardEditableParamsDefault.InputNormal,
            label: '按钮名称',
            placeholder: '请填入按钮名称，4个汉字',
          },
          params: {
            ...CardEditableParamsDefault.Obj,
            label: '按钮链接配置',
            param_params: {
              scheme: {
                ...CardEditableParamsDefault.InputNormal,
                label: '跳转链接',
                placeholder: '请填入跳转链接',
              },
              // action: {
              //   ...CardEditableParamsDefault.Action,
              //   label: '按钮事件',
              //   placeholder: '请选择按钮事件',
              //   tooltips: TooltipsData.others[1],
              // }
            },

            param_effect_parent: {
              effect_parent_keys: ['activities', 'ARRAY_NUM', 'button', 'sub_type'],
              effect_type: ['CHANGE_PARAMS'],
              effect_obj_params: [
                {
                  effect_regular: new RegExp("^0$"),
                  effect_new_obj_params: {},
                },
                {
                  effect_regular: new RegExp("^1$"),
                  effect_new_obj_params: {
                    scheme: ''
                  },
                },
                {
                  effect_regular: new RegExp("^2$"),
                  effect_new_obj_params: {
                    scheme: '',
                    action: ''
                  },
                },
              ]
            }
          }
        }
      },
      button_replace: {
        ...CardEditableParamsDefault.Obj,
        label: '达标后按钮配置',
        param_params: {
          sub_type: {
            ...CardEditableParamsDefault.DropdownNormal,
            label: '按钮类型',
            placeholder: '请选择按钮类型',
            valLists: [
              {
                name: '待解锁',  // 默认类型
                value: 0,
              },
              {
                name: '已达标',
                value: 1,
              },
              {
                name: '未达标',
                value: 2,
              },
            ],
          },
          name: {
            ...CardEditableParamsDefault.InputNormal,
            label: '按钮名称',
            placeholder: '请填入按钮名称，4个汉字',
          },
          params: {
            ...CardEditableParamsDefault.Obj,
            label: '按钮链接配置',
            param_params: {
              scheme: {
                ...CardEditableParamsDefault.InputNormal,
                label: '跳转链接',
                placeholder: '请填入跳转链接',
              },
              // action: {
              //   ...CardEditableParamsDefault.Action,
              //   label: '按钮事件',
              //   placeholder: '请选择按钮事件',
              //   tooltips: TooltipsData.others[1],
              // }
            },

            param_effect_parent: {
              effect_parent_keys: ['activities', 'ARRAY_NUM', 'button', 'sub_type'],
              effect_type: ['CHANGE_PARAMS'],
              effect_obj_params: [
                {
                  effect_regular: new RegExp("^0$"),
                  effect_new_obj_params: {},
                },
                {
                  effect_regular: new RegExp("^1$"),
                  effect_new_obj_params: {
                    scheme: ''
                  },
                },
                {
                  effect_regular: new RegExp("^2$"),
                  effect_new_obj_params: {
                    scheme: '',
                    action: ''
                  },
                },
              ]
            }
          }
        }
      },
    }
  },
  ...CardDataEditableParamsCommonDefault,
};
export default CARD_177;
